<?php
class Form_Demo extends Zend_Form
{
	public function init()
	{
		$this->setMethod('post');
		$this->setAction('');
		
		$element = new MyZendX_Form_Element_CascadeSelect('test1', array(
			'label' => 'Choose value',
			'multioptions' => $this->_getMultiOptions() 
		));
		$this->addElement($element);

		
		$this->addElement('submit', 'submit', array(
			'label' => 'Submit form'
		)); 
	}
	
	private function _getMultiOptions()
	{
		return array(
			''	=> '-',
			'a' => array(
				'label' => 'A', 
				'options' => array(
					'' => '-', 
					'a1' => array(
						'label'=>'A1', 
						'options'=>array('' => '-', 'a11' => 'A11', 'a12' => 'A12')),
					'a2' => 'A2')),
			'b' => array(
				'label' => 'B', 
				'options' => array('' => '-', 'b1' => 'B1', 'b2' => 'B2')));
	}
}